<div id="page">
<div class="page-title" style="z-index: 780;">
	<div class="in" style="z-index: 770;">
			<div class="titlebar" style="z-index: 760;">	<h2>Edit User</h2> <p>Update user info</p></div>
			<div class="clear" style="z-index: 740;"></div>
	</div>
</div>

<div class="content" style="z-index: 730;">
<?php
if($error && !empty($error_msg)){
?>
<div class="albox errorbox" style="z-index: 670;">
	<ul>
<?php
	foreach($error_msg as $err){
		echo "<li>$err</li>";
	}
	echo '</ul><a class="close tips" href="#" original-title="close">close</a></div>';
}
elseif($msg != ''){
?>
<div class="albox succesbox" style="z-index: 690;">
	<b>Success :</b> <?php echo $msg; ?>. 
	<a class="close tips" href="#" original-title="close">close</a>
</div>
<?php
}
?>
<div class="simplebox grid740" style="z-index: 720;">
		<div class="titleh" style="z-index: 710;">
			<h3>Add user form</h3>
		</div>
		<div class="body" style="z-index: 690;">
		
		  <form action="" method="post" name="form2" id="form2">
		  
			<div class="st-form-line" style="z-index: 680;">	
				<span class="st-labeltext">Username</span>	
				<input type="text" style="width:300px" id="textfield1" class="st-forminput" name="username" disabled="disabled" value="<?php echo $userInfo['user_name'] ?>"> 
			<div class="clear" style="z-index: 670;"></div>
			</div>
		  			
			<div class="st-form-line" style="z-index: 660;">	
				<span class="st-labeltext">Email</span>	
				<input type="text" style="width:300px" id="textfield1" class="st-forminput" name="email" value="<?php echo $userInfo['user_email'] ?>"> 
			<div class="clear" style="z-index: 650;"></div>
			</div>
			
			<!-- This is uniform selectbox - view this item class -->
			<div class="st-form-line" style="z-index: 640;">	<span class="st-labeltext">Account Type</span>	
			<div id="uniform-select1">
			<select id="select1" name="acctype">
			  <option value="2">Customer</option>
			  <option value="1"<?php if($userInfo['user_type'] == 1) echo ' selected'; ?>>Administrator</option>
			</select>
			</div>
				<div class="clear" style="z-index: 630;"></div> 
			</div>
			
			<div class="st-form-line" style="z-index: 500;">	
				<span class="st-labeltext">Change password ?</span>
					
					<!-- start checkbox iphone style -->
						<p class="field switch" id="changepwd">
						<label class="cb-enable" id="pwdyes" for="radio1"><span>Yes</span></label>
						<label class="cb-disable selected" id="pwdno" for="radio2"><span>No</span></label>
						<input type="hidden" name="pwdflag" id="pwdflag" value="0">
						</p>
					<!-- end checkbox iphone style -->
					
				<div class="clear" style="z-index: 490;"></div> 
			</div>
									
			<div class="st-form-line" style="z-index: 660;">	
				<span class="st-labeltext">Password</span>	
				<input type="password" style="width:300px" id="password" class="st-forminput" name="password" disabled="disabled"> 
			<div class="clear" style="z-index: 650;"></div>
			</div>
		  
			<div class="st-form-line" style="z-index: 660;">	
				<span class="st-labeltext">Re-type Password</span>	
				<input type="password" style="width:300px" id="password2" class="st-forminput" name="password2" disabled="disabled"> 
			<div class="clear" style="z-index: 650;"></div>
			</div>

			<div class="button-box" style="z-index: 460;">
			  <input type="submit" class="st-button" value="Submit" id="button" name="button">
			  <input type="reset" class="st-clear" value="Reset" id="button2" name="button">
			</div>
			<script language="javascript" type="text/javascript">
			$("#changepwd").click(function(obj){
				if($("#pwdyes").attr("class") == 'cb-enable selected'){
					$("#pwdflag").val("1");
					$("#password").removeAttr("disabled");
					$("#password2").removeAttr("disabled");
					$("#password").focus();
				}
				else{
					$("#pwdflag").val("0");
					$("#password").val("");
					$("#password2").val("");
					$("#password").attr("disabled", "disabled");
					$("#password2").attr("disabled", "disabled");
				}
			});
			</script>

		  </form>
		  
		</div>
	</div>
</div>
</div>